package com.mdjukebox.model.jukeboxfacade.actions;

import java.sql.Connection;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.mdjukebox.model.dao.CancionDAO;
import com.util.exceptions.InternalErrorException;
import com.util.exceptions.ModelException;
import com.util.sql.TransactionalPlainAction;

public class TotalCancionesAction implements TransactionalPlainAction {

	private static Log log = LogFactory.getLog(TotalCancionesAction.class);
	
	public TotalCancionesAction() {
	}
	
	public Object execute(Connection connection) throws ModelException,
			InternalErrorException {
						
			CancionDAO dao = new CancionDAO();
			return new Integer(dao.getTotalCanciones(connection));
	}
}
